package fr.aprr.odyssee.server.domain.entities;

// default package
// Generated Apr 23, 2014 11:01:50 PM by Hibernate Tools 4.0.0

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * DefOnglets generated by hbm2java
 */
@Entity
@Table(name = "ody$conf_def_onglets", schema = "public")
public class DefOnglets implements java.io.Serializable {

	private DefOngletsId id;
	private Autoroute autoroute;

	public DefOnglets() {
	}

	public DefOnglets(DefOngletsId id) {
		this.id = id;
	}

	public DefOnglets(DefOngletsId id, Autoroute autoroute) {
		this.id = id;
		this.autoroute = autoroute;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "nomOnglet", column = @Column(name = "nom_onglet", length = 30)),
			@AttributeOverride(name = "autoroute", column = @Column(name = "autoroute", length = 8)),
			@AttributeOverride(name = "pkDebut", column = @Column(name = "pk_debut")),
			@AttributeOverride(name = "pkFin", column = @Column(name = "pk_fin")),
			@AttributeOverride(name = "indiceAff", column = @Column(name = "indice_aff")) })
	public DefOngletsId getId() {
		return this.id;
	}

	public void setId(DefOngletsId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "autoroute", insertable = false, updatable = false)
	public Autoroute getAutoroute() {
		return this.autoroute;
	}

	public void setAutoroute(Autoroute autoroute) {
		this.autoroute = autoroute;
	}

}
